package dj.action;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ModelDriven;

import dj.action.base.BaseAction;
import dj.pageModel.PsmsStatus;
import dj.service.SmsService;

@Action("smsAction")
public class SmsAction extends BaseAction implements ModelDriven<PsmsStatus> {

	private PsmsStatus ps = new PsmsStatus();

	private SmsService smsService;

	public PsmsStatus getModel() {
		return ps;
	}

	public SmsService getSmsService() {
		return smsService;
	}

	@Autowired
	public void setSmsService(SmsService smsService) {
		this.smsService = smsService;
	}

	public void testsms() {
		List<String> phones = new ArrayList<String>();
		phones.add("15045427897");
		smsService.sendSms(phones, "ceshi", null, null);
	}
}
